# # 多值参数
# def test3(num, *list, **dic):
#     print(num)
#     print(list)
#     print(dic)
#
#
# test3(1, 2, 3, 4, 5, 6, name='yl', age=18)
#
#
# # 使用多值参数进行数字累加
# def acc(*args):
#     sum = 0
#     for x in args:
#         sum += x
#     return sum
#
#
# result = acc(1, 2, 3)
# print(result)


# 多值参数的拆包
def test4(*args, **dic):
    print(args, dic)


num_list = [1, 2, 3]
dic_list = {'name': 'yl', 'sex': '18'}

test4(num_list, dic_list)  # 默认全部放到args
test4(*num_list, **dic_list)
